<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%String path = request.getContextPath() ;%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %> 
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui" %> 
<%@ taglib uri="/WEB-INF/tld/fmt.tld" prefix="fmt" %> 
<!DOCTYPE html>
<html lang="zh-CN" >
<head>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>预约详情</title>
<jsp:include page="../../import.jsp" flush="true" />
</head>
<body class="iframeBody">
<div class="Wrapper">
	<form id="formSet1">
		<div class="fieldset1 tabel_col clearFix">
			<div class="caption">
				<span class="title">预约基本信息</span>
			</div>
			<div class="fieldBox col_50">
				<div class="label">客户经理</div>
				<div class="field">
					<span>${odrBscInfo.cstMgrNm}&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">创建时间</div>
				<div class="field">
					<span name="odrDt" id="odrDt">${odrBscInfo.crtTmString}</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">预约编号</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.odrNo}&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">&nbsp;</div>
				<div class="field">
					<span>&nbsp;</span>
				</div>
			</div>
			<div class="caption">
				<span class="title">客户信息</span>
			</div>
			<div class="fieldBox col_50">
				<div class="label">客户姓名</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm"><a href="javascript:showDetail('${odrBscInfo.cstId}','${odrBscInfo.cstBscInfoVO.cstTypCd}')">${odrBscInfo.cstNm}</a>&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">身份证</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.cstBscInfoVO.certNo}&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">手机号</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.cstBscInfoVO.cstNpBscInfoVO.mp1}&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">婚姻状况</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.cstBscInfoVO.cstNpBscInfoVO.marStsCdNm}&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">征信结果</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.creditRstCdNm}&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">联系电话</div>
				<div class="field">
					<span>${odrBscInfo.usrMp}&nbsp;</span>
				</div>
			</div>
			<c:if test="${not empty odrBscInfo.cstBscInfoVO }">
				<c:if test="${not empty odrBscInfo.cstBscInfoVO.cstNpBscInfoVO.cstNpSocialRlVO }">
			 	<div class="fieldBox col_50">
					<div class="label">配偶姓名</div>
					<div class="field">
						<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.cstBscInfoVO.cstNpBscInfoVO.cstNpSocialRlVO.rlNm}&nbsp;</span>
					</div>
				</div>
				<div class="fieldBox col_50">
					<div class="label">配偶身份证</div>
					<div class="field">
						<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.cstBscInfoVO.cstNpBscInfoVO.cstNpSocialRlVO.certNo}&nbsp;</span>
					</div>
				</div>
				<div class="fieldBox col_50">
					<div class="label">配偶手机号</div>
					<div class="field">
						<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.cstBscInfoVO.cstNpBscInfoVO.cstNpSocialRlVO.mp}&nbsp;</span>
					</div>
				</div>
				<div class="fieldBox col_50">
					<div class="label">&nbsp;</div>
					<div class="field">
						<span>&nbsp;</span>
					</div>
				</div>
				</c:if>
			</c:if>
			
			<div class="caption">
				<span class="title">车辆信息</span>
			</div>
			<div class="fieldBox col_50">
				<div class="label">产品名称</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">
						${odrBscInfo.odrPrdBscInfoVO.brCd}&nbsp;
						${odrBscInfo.odrPrdBscInfoVO.prdSeries}&nbsp;
						${odrBscInfo.odrPrdBscInfoVO.prdTyp}&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">上牌时间</div>
				<div class="field">
					<span name="licDt" id="licDt"><fmt:formatDate value="${odrBscInfo.odrPrdBscInfoVO.licDt}" pattern="yyyy-MM-dd" /></span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">上牌地区</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.odrPrdBscInfoVO.rgnPrCdNm}-${odrBscInfo.odrPrdBscInfoVO.rgnCyCdNm}&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">行驶里程（万公里）</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.odrPrdBscInfoVO.tvlMil}&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">车牌号</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.odrPrdBscInfoVO.licNo}&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">发票金额（元）</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.odrPrdBscInfoVO.invoiceAmt/100}&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">估值最高可贷金额（元）</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.odrPrdBscInfoVO.prdAmt/100}&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">信审最高可贷金额（元）</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.odrPrdBscInfoVO.auditPrdAmt/100}&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">挂靠公司</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.odrPrdBscInfoVO.lnkCompNm}&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">&nbsp;</div>
				<div class="field">
					<span>&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">行驶证</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm"><a href="javascript:viewAttachments('${odrBscInfo.odrPrdBscInfoVO.id}','0000','13')">查看</a>&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">登记证书</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm"><a href="javascript:viewAttachments('${odrBscInfo.odrPrdBscInfoVO.id}','0000','240')">查看</a>&nbsp;</span>
				</div>
			</div>
			<div class="caption">
				<span class="title">分期方案</span>
			</div>
			<div class="fieldBox col_50">
				<div class="label">合同编号</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.prjBscInfoVO.lsCntNo}&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">数据来源</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.dateResCdNm}&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">实际贷款金额（元）</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.odrQuatPrpsVO.contAmt/100}&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">年利率</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${yearPct }%&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">期限（月）</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.odrQuatPrpsVO.lsPd}&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">月付金额（元）</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.odrQuatPrpsVO.eachPayAmt/100}&nbsp;</span>
				</div>
			</div>
			
			<div class="fieldBox col_50">
				<div class="label">&nbsp;</div>
				<div class="field">
					<span>&nbsp;</span>
				</div>
			</div>
			<div class="caption">
				<span class="title">推荐人信息</span>
			</div>
			<div class="fieldBox col_50">
				<div class="label">一级推荐人</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.refOneNm}&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">一级返利金额（元）</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.refOneAmtNm}&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">二级推荐人</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.refTwoNm}&nbsp;</span>
				</div>
			</div>
			<div class="fieldBox col_50">
				<div class="label">二级返利金额（元）</div>
				<div class="field">
					<span name="cstMgrNm" id="cstMgrNm">${odrBscInfo.refTwoAmtNm}&nbsp;</span>
				</div>
			</div>
		</div>
	</form>
	<!-- 附件展示 -->
	<ul id="dowebok" style="display:none">
	</ul>
</div>
<script type="text/javascript">
function viewAttachments(_id,_orgCd,_typeCd) {
	var urlArray = null;
	//alert(_id);
	$.ajax({
		type : 'get',
		dataType : 'json',
		data : {
			id : _id,
			orgCd :_orgCd,
			typeCd: _typeCd
		},
		url : '<%=path%>/carloan/odrbscinfo/viewAttachments.do',
		beforeSend : function() {
			wait_dialog = $.ligerDialog.SQalert({
				content : '正在查询图片...',
				SQ_type : "waitting"
			});
		},
		success : function(msg) {
			wait_dialog.close();
			if (msg.success == 1) {
				//console.log(msg.data);
				urlArray = msg.data;
				if (urlArray != null && urlArray != "") {
					for (img in urlArray) {
						console.log(urlArray[img]);
						var li = '<li><img  src="' + urlArray[img] + '" alt=""></li>';
						$('#dowebok').append(li);
					}
					//$('#dowebok').viewer();
					var viewer = new Viewer(document.getElementById('dowebok'), {
						hidden : function() {
							//alert('hidden');
							urlArray = null;
							$('#dowebok').html('');
							viewer.destroy();
						},
					});
					viewer.show();
				} else {
					$.ligerDialog.SQalert({
						content : '该记录没有图片...',
						SQ_type : "warn"
					});
				}
			} else {
				$.ligerDialog.SQalert({
					content : msg.info,
					SQ_type : "error"
				});
			}
		}
	});
}
//查看数据
function showDetail(_id,_cstTypCd){
	//1 自然人  2 法人
	if(_cstTypCd == 1){
		parent.mainApp.f_addTab('tab_customer_np_detail'+_id,'客户详情','<%=path%>/customer/cstbscinfo/toCustCstBacInfoNpDetailPage.do?id='+_id);
	}else if(_cstTypCd == 2){
		parent.mainApp.f_addTab('tab_customer_corp_detail'+_id,'客户详情','<%=path%>/customer/cstbscinfo/toCustCstBacInfoCorpDetailPage.do?id='+_id);
	}
}
</script>
<style type="text/css">
.viewer-container{
	transform:scale(0.6);
	-webkit-transform:scale(0.6);
	-moz-transform:scale(0.6);
	-o-transform:scale(0.6);
	-ms-transform:scale(0.6);
}
</style>
</body>
</html>